const app = getApp();
const baseUrl = app.globalData.baseUrl,
    common = require('../../../utils/common');

Page({
    data: {
        StatusBar: app.globalData.StatusBar,
        CustomBar: app.globalData.CustomBar,
        data: []
    },
    onLoad: function (optinons) {
        // console.log(getCurrentPages());
        let Uid = optinons.Uid;
        let DCid = optinons.did;
        let that = this;
        wx.request({
            url: baseUrl + '/api/dynamic/getcomment',
            data: {
                Uid,
                DCid
            },
            method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
            // header: {}, // 设置请求的 header
            success: function (res) {
                // success
                console.log(res.data.data);
                that.setData({
                    data: res.data.data
                })
                console.log(that);
            },
            fail: function () {
                // fail
            },
            complete: function () {
                // complete
            }
        })
    },
    callback() {
        common.goBack();
    }
});